﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Homework5._7
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("请输入一串字母字符:");
            string str=Console.ReadLine();
            char[] chars = str.ToCharArray();
            int count1 = 0;
            int count2 = 0;
            foreach (char item in chars)
            {
                if (item >= 'A' && item <= 'Z')
                {
                    count1++;
                }
                if (item >= 'a' && item <= 'z')
                {
                    count2++;
                }
            }
            Console.WriteLine($"字符串中大写字母的个数为：{count1}");
            Console.WriteLine($"字符串中小写字母的个数为：{count2}");
            Console.ReadKey();
        }
    }
}
